#!/usr/bin/env python
#coding=utf8

import os
import os.path
import shutil

SRC_DIR=r'C:/youbiquan/deploy'
DEST_DIR=r'C:/youbiquan/backup'

dstDirs = []
for d in os.listdir(DEST_DIR):
	if os.path.isdir(d):
		dstDir = os.path.join(DEST_DIR,d)
		dstDirs.append(dstDir)

srcFiles = []
for f in os.listdir(SRC_DIR):
	if os.path.isfile(d):
		srcFiles.append(f)

for srcFile in srcFiles:
	for dstDir in dstDirs:
		src = os.path.join(SRC_DIR,f)
		dst = os.path.join(dstDir,f)
		shutil.copy(src,dst)
		print 'copy:%s->%s' % (src,dst)



